using MinimalistFoodStreet.BackEnd.Infrastructure.EFCore;
using MinimalistFoodStreet.BackEnd.Infrastructure.Dtos.Response.Tables;
using MinimalistFoodStreet.BackEnd.Infrastructure.Tools;

namespace MinimalistFoodStreet.BackEnd.Server.Server.ResponseExtend.Tables 
{
	public static class InfosEnitityExtend 
	{
		public static ResponseInfosDto ToResponseDto(this Info entity)
		{
			return new ResponseInfosDto ()
			{

					id = entity.IId,
					content = entity.IContent,
					sendMan = entity.ISendMan,
					receiveMan = entity.IReceiveMan,
					isRead = entity.IIsRead,
					createTime = entity.ICreateTime,
					createTimeStr = Tools.TimeToString(entity.ICreateTime),
			};
		}
	}
}